# Contributor: Sodface <sod@sodface.com>
# Maintainer: Sodface <sod@sodface.com>
pkgname=signal-estimator
pkgver=0.0.4_git20220623
_commit=0bd6830b2f170dad78d06be556280026ca9b0cef
pkgrel=0
pkgdesc="Measure characteristics of a looped back signal"
url="https://github.com/gavv/signal-estimator"
arch="all"
license="MIT"
options="!check" # no test suite
makedepends="
	alsa-lib-dev
	cmake
	cxxopts-dev
	qt5-qtbase-dev
	qwt-dev
	samurai
	"
subpackages="$pkgname-gui"
source="$pkgname-$_commit.tar.gz::https://github.com/gavv/signal-estimator/archive/$_commit/signal-estimator-$_commit.tar.gz"
builddir="$srcdir/signal-estimator-$_commit"

build() {
	cmake -B build -G Ninja \
		-DCMAKE_BUILD_TYPE=MinSizeRel \
		-DCMAKE_INSTALL_PREFIX=/usr
	cmake --build build
}

package() {
	DESTDIR="$pkgdir" cmake --install build
}

gui() {
	pkgdesc="$pkgdesc (GUI)"
	amove usr/bin/signal-estimator-gui
}

sha512sums="
dfa4bea6c0d9217a9c49e6a77666d2e52974a1bad6f04fa47bc7e2254a5a465bec27d6ac6a4b62a16e58bd60ecbfcecaf6ae4b1e7c1d663bcf8a337fd6a31afe  signal-estimator-0bd6830b2f170dad78d06be556280026ca9b0cef.tar.gz
"
